<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title></title>
	<script type="text/javascript" src="<%=basePath %>/bootstrap/js/jquery.js"></script>
	<script type="text/javascript" src="<%=basePath %>/bootstrap/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="<%=basePath %>/bootstrap/css/bootstrap.min.css" />
	<style type="text/css">
		body{
			background-image:url("<%=basePath%>/bootstrap/img/15.jpg");
			 background-attachment :local; 
			 background-size: cover;
		}
		.well{
			width:280px;
			height:200px;
			margin-left:auto;
			margin-right:auto;
			margin-top:100px;
		}
		span{
			color:red;
		}
	</style>
</head>
<body>
	<form class="well" action="updateUsergroup.action" method="post">
	  <label>小组名称</label>
	  <!--输出小组名称-->
	  <input type="text" class="span3" id="groupname" name="usergroup.groupname" value="${usergroup.groupname }"/><br/>
	  <span class="name-error"></span>
	  <label>用户</label>
	  <!--for循环输出在此小组的用户-->
	  <c:forEach items="${ug.userSet }" var="u">
	  	${u.username }<br/>
	  </c:forEach>
	  <br/>
	  <input type="button" class="btn btn-primary" id="bttn" value="submit"/>
	  <button type="reset" class="btn">Reset</button>
	</form>
	<script type="text/javascript">
		//$(document).ready(function(){
			$("#bttn").click(function(){
				var zhanghao = $("#groupname").val();
				if(zhanghao.trim() == ""){
					$(".name-error").html("请输入小组名");
					return;
				}else{
					$(".well").submit();
				}
			});
			
		//})；
</script>
</body>
</html>